package com.theta.gateway.infra.routecfg.service;

import java.util.List;

import com.theta.gateway.infra.common.base.PageResult;
import com.theta.gateway.infra.routecfg.model.dataobject.request.RouteCfgQueryDTO;
import com.theta.gateway.infra.routecfg.model.dataobject.request.RouteCfgSaveDTO;
import com.theta.gateway.infra.routecfg.model.dataobject.request.RouteCfgStatusChangeDTO;
import com.theta.gateway.infra.routecfg.model.dataobject.response.RouteCfgDO;

/**
 * <p>
 * 动态路由配置表，服务表 服务类
 * </p>
 *
 * @author theta
 */
public interface RouteCfgRepository {
	
	
	public void saveRouteCfg(RouteCfgSaveDTO saveDto);
	
	public void deleteRouteCfg(RouteCfgDO cfgDo);

	public void deleteRouteCfgCache(String cacheKey);
	
	public void changeRouteStatus(RouteCfgDO cfgDo,RouteCfgStatusChangeDTO changeDto);
	
	public RouteCfgDO getDetailById(Long id);
	
	public List<RouteCfgDO> getAllRouteCfgs();
	
	public List<RouteCfgDO> getRouteCfgs(RouteCfgQueryDTO query);
	
	public PageResult<RouteCfgDO> getRoutePage(RouteCfgQueryDTO query);
	
	public List<RouteCfgDO> getServiceRoutes(String serviceId);
	
	public RouteCfgDO getCacheServiceRoute(String serviceId);

}
